package com.demiroot.server;

import java.net.URL;
import java.util.Calendar;
import java.util.List;

public class PhysicalItemResponse implements HTTPResponse {
	byte[] item;
	
	public PhysicalItemResponse(URL file) throws Exception{
		item = ServerUtils.fileToByteArray(file);
	}

	@Override
	public byte[] getMessageAsByteArray() {
		return item;
	}

	@Override
	public int getCode() {
		return 200;
	}

	@Override
	public HeaderData getHeader() {
		return null;
	}

	@Override
	public Object getMessage() {
		return item;
	}

	@Override
	public ResponseType getResponseType() {
		return ResponseType.BYTEARRAY;
	}


	@Override
	public List<Cookie> getCookies() {
		return null;
	}


	@Override
	public Calendar cookieExpire() {
		return null;
	}

}
